#!/bin/bash
# Run qemu, then wait for a .end
rm -f "$1".end
"$1" -loadvm 1 &
while [ ! -e "$1".end ]
do
    sleep 1
done
kill %1
sleep 5
kill -9 %1
